﻿@model Coslen.TahorCRM.Domain.Entities.ViewModels.Editing.AddressTypeEditViewModel
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section HeaderIncludes{
    <!-- JavaScript Includes -->
    <script src="@Url.Content("~/Scripts/fullcalendar.js")" type="text/javascript"></script>
    <!-- Style Sheets -->
    <link href="@Url.Content("~/Content/fullcalendar.css")" rel="stylesheet" type="text/css" />
}
<script type="text/javascript">
    $(document).ready(function () {
        // page is now ready, initialize the calendar...
        $('#calendar').fullCalendar({
            eventSources: [

                // your event source
                {
                    url: '/Events/Event/GetMonthsEvents',
                    type: 'GET',
                    data: {
                        userId: '@(ViewBag.TahorUser == null? "0" : ViewBag.TahorUser.UserId)'
                    },
                    error: function() {
                        alert('there was an error while fetching events!');
                    }
                }

                // any other sources...

            ]
        });

    });
</script>
<h2>Tahor CRM - Welcome</h2>
<div id="calendar">
</div>
<div>
    @Html.ActionLink("Printable Calendar", "PrintCalendar", new { controller = "Event", area = "Events"})
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#jMenu").jMenu();
    })
</script>
